package com.itheima.多态.多态的好处和弊端;

public abstract class Animal {
    public abstract void eat();
}

class Cat extends Animal{
    public void eat(){
        System.out.println("猫吃鱼");
    }
}

class Dog extends Animal{
    public void eat(){
        System.out.println("狗吃骨头");
    }
}